
import sys
# A simple setup script to create an executable using PyQt5. This also
# demonstrates the method for creating a Windows executable that does not have
# an associated console.
#
# PyQt5app.py is a very simple type of PyQt5 application
#
# Run the build process by running the command 'python setup.py build'
#
# If everything works well you should find a subdirectory in the build
# subdirectory that contains the files needed to run the application

import sys
from cx_Freeze import setup, Executable

base = None
if sys.platform == "win32":
    base = "Win32GUI"

import os
python_dir = os.path.dirname(sys.executable)  # directory of your python installation
ifiles = ["PyQt5", "atexit","requests","loguru","pysolace","talib","sentry_sdk.integrations",
          "talib.stream", "xxhash",
          "sentry_sdk.integrations.aiohttp","sentry_sdk.integrations.argv",
          "sentry_sdk.integrations.asgi","sentry_sdk.integrations.atexit",
          "sentry_sdk.integrations.aws_lambda","sentry_sdk.integrations.beam",
          "sentry_sdk.integrations.bottle", "sentry_sdk.integrations.celery",
          "sentry_sdk.integrations.dedupe", "sentry_sdk.integrations.excepthook",
          "sentry_sdk.integrations.falcon", "sentry_sdk.integrations.flask",
          "sentry_sdk.integrations.stdlib", "sentry_sdk.integrations.modules",
          "sentry_sdk.integrations.threading"
         ]
                     
build_exe_options = {"packages": ["os"], 
                     "includes": ifiles,
                     "include_files": ['.env', 'stock_ticker.png',os.path.join(python_dir, "python3.dll"), os.path.join(python_dir, "vcruntime140.dll")], 
                     "excludes": ["tkinter"]}

executables = [Executable("main.py",
                        targetName=u"期貨下單程式.exe",
                        icon="stock_ticker.ico",
                        base=base)]


setup(  name = " 期貨下單程式",
        version = "0.2",
        description = "Flexicounts pour faire tes comptes facilement",
        options = {"build_exe": build_exe_options},
        executables = executables)